const office = require('../service/office')

// 获取科室列表
const getOffice = async (ctx) => {
    let res = await office.getOfficeList(ctx.query)
    if(res.length > 0){
        return ctx.body={
            code:20000,
            data:res,
            total:res.length,
            msg:'查询成功'
        }
    }else{
        return ctx.body={
            code:40001,
            msg:'传递的参数有误'
        }
    }
}

module.exports = {
    getOffice
}